#正序：
for k in range(1,10):
    for v in range(1,k+1):
#        print('%d*%d=%d'%(k ,v ,k*v),end=' ')
           print('{}*{}={:<2}'.format(k, v, k*v),end=' ')
    print(' ')

#倒序：
for k in range(9,0,-1):
    for v in range(k,0,-1):
        print('{}*{}={:<2}'.format(k, v, k*v),end=' ')
    print(' ')

# 厉害了我的哥